package com.esri.core.tasks.ags.geoprocessing;

import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class GPDouble extends GPParameter {
    private static final long serialVersionUID = 1;
    private double value;

    public GPDouble(String str) {
        setParamName(str);
        this.dataType = "GPDouble";
    }

    public GPDouble() {
        this("");
    }

    public double getValue() {
        return this.value;
    }

    public void setValue(double d) {
        this.value = d;
    }

    @Override // com.esri.core.tasks.ags.geoprocessing.GPParameter
    public String generateValueParams() {
        return String.valueOf(this.value);
    }

    @Override // com.esri.core.tasks.ags.geoprocessing.GPParameter
    public void fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() == JsonToken.VALUE_NUMBER_FLOAT) {
            this.value = jsonParser.getDoubleValue();
        }
    }

    public int hashCode() {
        long doubleToLongBits = Double.doubleToLongBits(this.value);
        return 31 + ((int) (doubleToLongBits ^ (doubleToLongBits >>> 32)));
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        return obj != null && getClass() == obj.getClass() && Double.doubleToLongBits(this.value) == Double.doubleToLongBits(((GPDouble) obj).value);
    }

    public String toString() {
        return "GPDouble [value=" + this.value + "]";
    }
}
